﻿using System.Windows.Input;

namespace Super.Admin.Utils.ThemeManager
{
    /// <summary>
    /// 快捷键设置
    /// </summary>
    public class ShortcutSettings : ThemeViewModelBase
    {
        private GlobalShortcut _globalShortcut = new GlobalShortcut();
        /// <summary>
        /// 全局设置
        /// </summary>
        public GlobalShortcut GlobalShortcut
        {
            get => _globalShortcut;
            set => SetProperty(ref _globalShortcut, value);
        }

    }
    /// <summary>
    /// 全局快捷键设置
    /// </summary>
    public class GlobalShortcut : ThemeViewModelBase
    {
        private bool _enable = true;
        /// <summary>
        /// 是否启用全局快捷键
        /// </summary>
        public bool Enable
        {
            get => _enable;
            set => SetProperty(ref _enable, value);
        }
        private Shortcut _globalSearch = new Shortcut
        {
            ShortcutKeysText = "Control+K",
            EnableShortcut = true,
        };
        /// <summary>
        /// 全局搜索快捷键
        /// </summary>
        public Shortcut GlobalSearch
        {
            get => _globalSearch;
            set => SetProperty(ref _globalSearch, value);
        }
        private Shortcut _logout = new Shortcut
        {
            ShortcutKeysText = "Control+Q",
            EnableShortcut = true,
        };
        /// <summary>
        /// 注销快捷键
        /// </summary>
        public Shortcut Logout
        {
            get => _logout;
            set => SetProperty(ref _logout, value);
        }
        private Shortcut _lockScreen = new Shortcut
        {
            ShortcutKeysText = "Control+L",
            EnableShortcut = true,
        };
        /// <summary>
        /// 锁屏快捷键
        /// </summary>
        public Shortcut LockScreen
        {
            get => _lockScreen;
            set => SetProperty(ref _lockScreen, value);
        }
        private Shortcut _freshView = new Shortcut
        {
            ShortcutKeysText = "F5",
            EnableShortcut = true,
        };
        /// <summary>
        /// 刷新视图快捷键
        /// </summary>
        public Shortcut RefreshView
        {
            get => _freshView;
            set => SetProperty(ref _freshView, value);
        }
        private Shortcut _fullScreen = new Shortcut
        {
            ShortcutKeysText = "F11",
            EnableShortcut = true,
        };
        /// <summary>
        /// 全屏快捷键
        /// </summary>
        public Shortcut FullScreen
        {
            get => _fullScreen;
            set => SetProperty(ref _fullScreen, value);
        }
    }
    /// <summary>
    /// 快捷键模型
    /// </summary>
    public class Shortcut : ThemeViewModelBase
    {
        private string _shortcutKeysText;
        /// <summary>
        /// 快捷键
        /// </summary>
        public string ShortcutKeysText
        {
            get => _shortcutKeysText;
            set => SetProperty(ref _shortcutKeysText, value);
        }
        private bool _enableShortcut;
        /// <summary>
        /// 是否启用快捷键
        /// </summary>
        public bool EnableShortcut
        {
            get => _enableShortcut;
            set => SetProperty(ref _enableShortcut, value);
        }
    }
}